from SocketServer import (UDPServer as UDP, DatagramRequestHandler as DRH)
from time import ctime

HOST = ''
PORT = 21567
ADDR = (HOST, PORT)

class MyRequestHandler(DRH):
    def handle(self):
        print '...connected from:', self.client_address
        self.wfile.write('[%s] %s' % (ctime(), self.rfile.readline()))

udp_ser = UDP(ADDR, MyRequestHandler)
print 'waiting for connection...'
udp_ser.serve_forever()
